<template>
  <div>
      <!-- 头部 -->
     <headers :city='city'></headers>
    <!-- 轮播图 -->
    <headerswiper :swiperList='swiperList'></headerswiper>
    <!-- 九宫格 -->
    <headernine :iconList='iconList'></headernine>
    <!-- 去哪儿 -->
    <weekend :weekendList='weekendList'></weekend>
  </div>
</template>

<script>
import axios from 'axios'
import headers from './components/headers'
import headerswiper from './components/headerswiper'
import headernine from './components/headernine'
import weekend from './components/weekend'
export default {
  name: "index",
  components: {
      headers,
      headerswiper,
      headernine,
      weekend
  },
  props: [],
  data() {
    return {
     city:"",
     swiperList:[],
     iconList:[],
     weekendList:[]
    };
  },
  mounted() {
    this.getlist()
  },
  methods: {
    getlist(){
      axios.get('/static/mock/index.json').then(res=>{

        console.log(res.data.data.city)
        console.log(res.data.data.swiperList)
        console.log(res.data.data.iconList)
        this.city=res.data.data.city
        this.swiperList=res.data.data.swiperList
        this.iconList=res.data.data.iconList
        this.weekendList=res.data.data.weekendList
      })
    }
  },
  computed: {},
  watch: {},
  created() {},
};
</script>

<style lang='stylus'   scoped>
</style>
